<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>背景</title>
    <style>
        div {
            width: 1000px;
            height: 700px;
            border: 1px solid red;
            margin-bottom: 10px;
        }

        div:nth-of-type(1) {
            /*默认平铺效果*/
            background-image: url("imgs/avatar.jpg");
            background-repeat: repeat-x;
        }

        div:nth-of-type(2) {
            background-image: url("imgs/avatar.jpg");
            background-repeat: repeat-y;
        }

        div:nth-of-type(3) {
            background-image: url("imgs/avatar.jpg");
            background-repeat: no-repeat;
            background-position: 330px;
        }
    </style>
</head>
<body>


<div></div>
<div></div>
<div></div>


</body>
</html>